#pragma once
#include <iostream>
#include <vector>
#include <string>

class Util
{
public:
    static void cutString(const std::string& s, const std::string seq, std::vector<std::string> *out)
    {
        size_t start = 0;
        size_t n = s.size();

        while(start < n)
        {
            size_t pos = s.find(seq, start);
            if(pos == std::string::npos) break;
            out->push_back(s.substr(start, pos - start));
            start = pos + seq.size();
        }

        if(start < n)
        {
            out->push_back(s.substr(start));
        }
    }
};